package com.example.sonone.consumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;


/**
 *   消费者  消费springboot整合kafaka的 KafkaController
 */
@Component
public class MyConsumerBoot {

    @KafkaListener(topics = "mytopic",group = "testGroup")
    public void listen(ConsumerRecord<String, String> record) {
        String value = record.value();

        System.out.println(value);

        System.out.println(record);

    }





}
